<?php
/**
 * JoiEditor - Joostina WYSIWYG Editor
 *
 * Backend uninstall handler
 *
 * @version 1.0 beta 3
 * @package JoiEditor
 * @subpackage	Installer
 * @filename uninstall.joieditor.php
 * @author JoostinaTeam
 * @copyright (C) 2008-2010 Joostina Team
 * @license see license.txt
 *
 **/

defined('_VALID_MOS') or die();


function com_uninstall(){
	$database = &database::getInstance();

	$query = "DELETE FROM #__config AS c WHERE c.group = 'joieditor'";
	$database->setQuery($query);
	$database->query(); 

	@unlink(JPATH_BASE . '/mambots/editors/joieditor.xml');
	@unlink(JPATH_BASE . '/mambots/editors/joieditor.php');

	$query = "DELETE FROM #__mambots WHERE folder = 'editors' AND element = 'joieditor'";
	$database->setQuery($query);
	$database->query(); 
}